\hypertarget{a00091}{}\section{E\+:/knet-\/git/knet/knet/ringbuffer.c 文件参考}
\label{a00091}\index{E\+:/knet-\/git/knet/knet/ringbuffer.\+c@{E\+:/knet-\/git/knet/knet/ringbuffer.\+c}}
{\ttfamily \#include $<$stdlib.\+h$>$}\\*
{\ttfamily \#include \char`\"{}ringbuffer.\+h\char`\"{}}\\*
\subsection*{结构体}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{a00034}{\+\_\+ringbuffer\+\_\+t}
\end{DoxyCompactItemize}
\subsection*{函数}
\begin{DoxyCompactItemize}
\item 
\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$ \hyperlink{a00091_a81244fe21f0b4fdcf45e66ae6257afaf_a81244fe21f0b4fdcf45e66ae6257afaf}{ringbuffer\+\_\+create} (uint32\+\_\+t size)
\begin{DoxyCompactList}\small\item\em 建立一个ringbuffer \end{DoxyCompactList}\item 
int \hyperlink{a00091_ab74775801f1ad149ac0beb37336f92e3_ab74775801f1ad149ac0beb37336f92e3}{ringbuffer\+\_\+eat\+\_\+all} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 清除所有可读字节 \end{DoxyCompactList}\item 
int \hyperlink{a00091_a1ee13a66a33b0d5648d7c95b48bd6536_a1ee13a66a33b0d5648d7c95b48bd6536}{ringbuffer\+\_\+eat} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb, uint32\+\_\+t size)
\begin{DoxyCompactList}\small\item\em 清除指定长度的可读字节 \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{a00091_acccb44d353cc569d1f39cf01125c88bf_acccb44d353cc569d1f39cf01125c88bf}{ringbuffer\+\_\+read} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb, char $\ast$buffer, uint32\+\_\+t size)
\begin{DoxyCompactList}\small\item\em 读取并清除 \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{a00091_a89fdbed1466be114d8200405db2e18a5_a89fdbed1466be114d8200405db2e18a5}{ringbuffer\+\_\+copy} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb, char $\ast$buffer, uint32\+\_\+t size)
\begin{DoxyCompactList}\small\item\em 读取但不清除 \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{a00091_aecd5c166ce42982ee434172cc555787d_aecd5c166ce42982ee434172cc555787d}{ringbuffer\+\_\+available} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 取得可读字节数 \end{DoxyCompactList}\item 
void \hyperlink{a00091_aa6135df0cc9bc827cae301626898dace_aa6135df0cc9bc827cae301626898dace}{ringbuffer\+\_\+destroy} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 销毁ringbuffer \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{a00091_a4bd33ec2ce3cba490a6166c5eac88f5c_a4bd33ec2ce3cba490a6166c5eac88f5c}{ringbuffer\+\_\+read\+\_\+lock\+\_\+size} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 取得非绕回连续地址的最大可读字节数 \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{a00091_a51fd16b89396cbe6a3e4cf3d41b4dda5_a51fd16b89396cbe6a3e4cf3d41b4dda5}{ringbuffer\+\_\+read\+\_\+lock\+\_\+ptr} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 取得可读数据起止指针 \end{DoxyCompactList}\item 
void \hyperlink{a00091_a5d0caeccb61acafaa4c5148b697dd927_a5d0caeccb61acafaa4c5148b697dd927}{ringbuffer\+\_\+read\+\_\+commit} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb, uint32\+\_\+t size)
\begin{DoxyCompactList}\small\item\em 提交并清除已经读到的字节 \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{a00091_ae50358352ded17ea670e926a59250cd0_ae50358352ded17ea670e926a59250cd0}{ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+size} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 虚拟窗口 -\/ 取得非绕回连续地址的最大可读字节数 \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{a00091_ad11b70346a4c8b62b21b04d5b064aab4_ad11b70346a4c8b62b21b04d5b064aab4}{ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+ptr} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 虚拟窗口 -\/ 取得可读数据起止指针 \end{DoxyCompactList}\item 
void \hyperlink{a00091_a97a9944a61a5323f80fb07f0fa4d8ff5_a97a9944a61a5323f80fb07f0fa4d8ff5}{ringbuffer\+\_\+window\+\_\+read\+\_\+commit} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb, uint32\+\_\+t size)
\begin{DoxyCompactList}\small\item\em 虚拟窗口 -\/ 提交已经读到的字节，但不清除 \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{a00091_aa5b19df813e8df494a77c9a849ebffdd_aa5b19df813e8df494a77c9a849ebffdd}{ringbuffer\+\_\+write\+\_\+lock\+\_\+size} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 取得非绕回可连续写入的最大长度 \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{a00091_af34961f27369651af41a96f736a813af_af34961f27369651af41a96f736a813af}{ringbuffer\+\_\+write\+\_\+lock\+\_\+ptr} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 取得可写起始指针 \end{DoxyCompactList}\item 
void \hyperlink{a00091_a92305d9585adf8fe35c059b04f635d30_a92305d9585adf8fe35c059b04f635d30}{ringbuffer\+\_\+write\+\_\+commit} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb, uint32\+\_\+t size)
\begin{DoxyCompactList}\small\item\em 提交成功写入的字节数 \end{DoxyCompactList}\item 
int \hyperlink{a00091_a49e8fe0e7125070f1ff2bb05ea31b5f0_a49e8fe0e7125070f1ff2bb05ea31b5f0}{ringbuffer\+\_\+full} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 满 \end{DoxyCompactList}\item 
int \hyperlink{a00091_a3c08364c473757fa8f33fc6a99ce7091_a3c08364c473757fa8f33fc6a99ce7091}{ringbuffer\+\_\+empty} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 空 \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{a00091_a2862a8ab39436df6e7db4f6e7f23acf2_a2862a8ab39436df6e7db4f6e7f23acf2}{ringbuffer\+\_\+get\+\_\+max\+\_\+size} (\hyperlink{a00056_a66d91f7667db1f0b2983fc25e1a20f1c_a66d91f7667db1f0b2983fc25e1a20f1c}{kringbuffer\+\_\+t} $\ast$rb)
\begin{DoxyCompactList}\small\item\em 取得最大长度 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{函数说明}
\hypertarget{a00091_aecd5c166ce42982ee434172cc555787d_aecd5c166ce42982ee434172cc555787d}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+available@{ringbuffer\+\_\+available}}
\index{ringbuffer\+\_\+available@{ringbuffer\+\_\+available}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+available}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t ringbuffer\+\_\+available (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_aecd5c166ce42982ee434172cc555787d_aecd5c166ce42982ee434172cc555787d}


取得可读字节数 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
可读字节数 
\end{DoxyReturn}
\hypertarget{a00091_a89fdbed1466be114d8200405db2e18a5_a89fdbed1466be114d8200405db2e18a5}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+copy@{ringbuffer\+\_\+copy}}
\index{ringbuffer\+\_\+copy@{ringbuffer\+\_\+copy}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+copy}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t ringbuffer\+\_\+copy (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb, }
\item[{char $\ast$}]{buffer, }
\item[{uint32\+\_\+t}]{size}
\end{DoxyParamCaption}
)}\label{a00091_a89fdbed1466be114d8200405db2e18a5_a89fdbed1466be114d8200405db2e18a5}


读取但不清除 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
{\em buffer} & 写入缓冲区指针 \\
\hline
{\em size} & 写入缓冲区长度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
实际读出字节数 
\end{DoxyReturn}
\hypertarget{a00091_a81244fe21f0b4fdcf45e66ae6257afaf_a81244fe21f0b4fdcf45e66ae6257afaf}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+create@{ringbuffer\+\_\+create}}
\index{ringbuffer\+\_\+create@{ringbuffer\+\_\+create}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+create}]{\setlength{\rightskip}{0pt plus 5cm}{\bf kringbuffer\+\_\+t}$\ast$ ringbuffer\+\_\+create (
\begin{DoxyParamCaption}
\item[{uint32\+\_\+t}]{size}
\end{DoxyParamCaption}
)}\label{a00091_a81244fe21f0b4fdcf45e66ae6257afaf_a81244fe21f0b4fdcf45e66ae6257afaf}


建立一个ringbuffer 


\begin{DoxyParams}{参数}
{\em size} & 最大长度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
kringbuffer\+\_\+t实例 
\end{DoxyReturn}
\hypertarget{a00091_aa6135df0cc9bc827cae301626898dace_aa6135df0cc9bc827cae301626898dace}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+destroy@{ringbuffer\+\_\+destroy}}
\index{ringbuffer\+\_\+destroy@{ringbuffer\+\_\+destroy}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+destroy}]{\setlength{\rightskip}{0pt plus 5cm}void ringbuffer\+\_\+destroy (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_aa6135df0cc9bc827cae301626898dace_aa6135df0cc9bc827cae301626898dace}


销毁ringbuffer 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}
\hypertarget{a00091_a1ee13a66a33b0d5648d7c95b48bd6536_a1ee13a66a33b0d5648d7c95b48bd6536}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+eat@{ringbuffer\+\_\+eat}}
\index{ringbuffer\+\_\+eat@{ringbuffer\+\_\+eat}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+eat}]{\setlength{\rightskip}{0pt plus 5cm}int ringbuffer\+\_\+eat (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb, }
\item[{uint32\+\_\+t}]{size}
\end{DoxyParamCaption}
)}\label{a00091_a1ee13a66a33b0d5648d7c95b48bd6536_a1ee13a66a33b0d5648d7c95b48bd6536}


清除指定长度的可读字节 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
{\em size} & 需要清除的长度 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em error\+\_\+ok} & 成功 \\
\hline
{\em 其他} & 失败 \\
\hline
\end{DoxyRetVals}
\hypertarget{a00091_ab74775801f1ad149ac0beb37336f92e3_ab74775801f1ad149ac0beb37336f92e3}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+eat\+\_\+all@{ringbuffer\+\_\+eat\+\_\+all}}
\index{ringbuffer\+\_\+eat\+\_\+all@{ringbuffer\+\_\+eat\+\_\+all}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+eat\+\_\+all}]{\setlength{\rightskip}{0pt plus 5cm}int ringbuffer\+\_\+eat\+\_\+all (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_ab74775801f1ad149ac0beb37336f92e3_ab74775801f1ad149ac0beb37336f92e3}


清除所有可读字节 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em error\+\_\+ok} & 成功 \\
\hline
{\em 其他} & 失败 \\
\hline
\end{DoxyRetVals}
\hypertarget{a00091_a3c08364c473757fa8f33fc6a99ce7091_a3c08364c473757fa8f33fc6a99ce7091}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+empty@{ringbuffer\+\_\+empty}}
\index{ringbuffer\+\_\+empty@{ringbuffer\+\_\+empty}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+empty}]{\setlength{\rightskip}{0pt plus 5cm}int ringbuffer\+\_\+empty (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_a3c08364c473757fa8f33fc6a99ce7091_a3c08364c473757fa8f33fc6a99ce7091}


空 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em 0} & 非空 \\
\hline
{\em 非零} & 空 \\
\hline
\end{DoxyRetVals}
\hypertarget{a00091_a49e8fe0e7125070f1ff2bb05ea31b5f0_a49e8fe0e7125070f1ff2bb05ea31b5f0}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+full@{ringbuffer\+\_\+full}}
\index{ringbuffer\+\_\+full@{ringbuffer\+\_\+full}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+full}]{\setlength{\rightskip}{0pt plus 5cm}int ringbuffer\+\_\+full (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_a49e8fe0e7125070f1ff2bb05ea31b5f0_a49e8fe0e7125070f1ff2bb05ea31b5f0}


满 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em 0} & 未满 \\
\hline
{\em 非零} & 满 \\
\hline
\end{DoxyRetVals}
\hypertarget{a00091_a2862a8ab39436df6e7db4f6e7f23acf2_a2862a8ab39436df6e7db4f6e7f23acf2}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+get\+\_\+max\+\_\+size@{ringbuffer\+\_\+get\+\_\+max\+\_\+size}}
\index{ringbuffer\+\_\+get\+\_\+max\+\_\+size@{ringbuffer\+\_\+get\+\_\+max\+\_\+size}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+get\+\_\+max\+\_\+size}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t ringbuffer\+\_\+get\+\_\+max\+\_\+size (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_a2862a8ab39436df6e7db4f6e7f23acf2_a2862a8ab39436df6e7db4f6e7f23acf2}


取得最大长度 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
最大长度 
\end{DoxyReturn}
\hypertarget{a00091_acccb44d353cc569d1f39cf01125c88bf_acccb44d353cc569d1f39cf01125c88bf}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+read@{ringbuffer\+\_\+read}}
\index{ringbuffer\+\_\+read@{ringbuffer\+\_\+read}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+read}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t ringbuffer\+\_\+read (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb, }
\item[{char $\ast$}]{buffer, }
\item[{uint32\+\_\+t}]{size}
\end{DoxyParamCaption}
)}\label{a00091_acccb44d353cc569d1f39cf01125c88bf_acccb44d353cc569d1f39cf01125c88bf}


读取并清除 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
{\em buffer} & 写入缓冲区指针 \\
\hline
{\em size} & 写入缓冲区长度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
实际读出字节数 
\end{DoxyReturn}
\hypertarget{a00091_a5d0caeccb61acafaa4c5148b697dd927_a5d0caeccb61acafaa4c5148b697dd927}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+read\+\_\+commit@{ringbuffer\+\_\+read\+\_\+commit}}
\index{ringbuffer\+\_\+read\+\_\+commit@{ringbuffer\+\_\+read\+\_\+commit}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+read\+\_\+commit}]{\setlength{\rightskip}{0pt plus 5cm}void ringbuffer\+\_\+read\+\_\+commit (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb, }
\item[{uint32\+\_\+t}]{size}
\end{DoxyParamCaption}
)}\label{a00091_a5d0caeccb61acafaa4c5148b697dd927_a5d0caeccb61acafaa4c5148b697dd927}


提交并清除已经读到的字节 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
{\em size} & 已经读出的字节数 \\
\hline
\end{DoxyParams}
\hypertarget{a00091_a51fd16b89396cbe6a3e4cf3d41b4dda5_a51fd16b89396cbe6a3e4cf3d41b4dda5}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+read\+\_\+lock\+\_\+ptr@{ringbuffer\+\_\+read\+\_\+lock\+\_\+ptr}}
\index{ringbuffer\+\_\+read\+\_\+lock\+\_\+ptr@{ringbuffer\+\_\+read\+\_\+lock\+\_\+ptr}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+read\+\_\+lock\+\_\+ptr}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ringbuffer\+\_\+read\+\_\+lock\+\_\+ptr (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_a51fd16b89396cbe6a3e4cf3d41b4dda5_a51fd16b89396cbe6a3e4cf3d41b4dda5}


取得可读数据起止指针 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
可读数据起止指针 
\end{DoxyReturn}
\hypertarget{a00091_a4bd33ec2ce3cba490a6166c5eac88f5c_a4bd33ec2ce3cba490a6166c5eac88f5c}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+read\+\_\+lock\+\_\+size@{ringbuffer\+\_\+read\+\_\+lock\+\_\+size}}
\index{ringbuffer\+\_\+read\+\_\+lock\+\_\+size@{ringbuffer\+\_\+read\+\_\+lock\+\_\+size}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+read\+\_\+lock\+\_\+size}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t ringbuffer\+\_\+read\+\_\+lock\+\_\+size (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_a4bd33ec2ce3cba490a6166c5eac88f5c_a4bd33ec2ce3cba490a6166c5eac88f5c}


取得非绕回连续地址的最大可读字节数 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
非绕回连续地址的最大可读字节数 
\end{DoxyReturn}
\hypertarget{a00091_a97a9944a61a5323f80fb07f0fa4d8ff5_a97a9944a61a5323f80fb07f0fa4d8ff5}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+window\+\_\+read\+\_\+commit@{ringbuffer\+\_\+window\+\_\+read\+\_\+commit}}
\index{ringbuffer\+\_\+window\+\_\+read\+\_\+commit@{ringbuffer\+\_\+window\+\_\+read\+\_\+commit}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+window\+\_\+read\+\_\+commit}]{\setlength{\rightskip}{0pt plus 5cm}void ringbuffer\+\_\+window\+\_\+read\+\_\+commit (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb, }
\item[{uint32\+\_\+t}]{size}
\end{DoxyParamCaption}
)}\label{a00091_a97a9944a61a5323f80fb07f0fa4d8ff5_a97a9944a61a5323f80fb07f0fa4d8ff5}


虚拟窗口 -\/ 提交已经读到的字节，但不清除 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
{\em size} & 已经读出的字节数 \\
\hline
\end{DoxyParams}
\hypertarget{a00091_ad11b70346a4c8b62b21b04d5b064aab4_ad11b70346a4c8b62b21b04d5b064aab4}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+ptr@{ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+ptr}}
\index{ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+ptr@{ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+ptr}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+ptr}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+ptr (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_ad11b70346a4c8b62b21b04d5b064aab4_ad11b70346a4c8b62b21b04d5b064aab4}


虚拟窗口 -\/ 取得可读数据起止指针 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
可读数据起止指针 
\end{DoxyReturn}
\hypertarget{a00091_ae50358352ded17ea670e926a59250cd0_ae50358352ded17ea670e926a59250cd0}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+size@{ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+size}}
\index{ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+size@{ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+size}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+size}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t ringbuffer\+\_\+window\+\_\+read\+\_\+lock\+\_\+size (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_ae50358352ded17ea670e926a59250cd0_ae50358352ded17ea670e926a59250cd0}


虚拟窗口 -\/ 取得非绕回连续地址的最大可读字节数 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
非绕回连续地址的最大可读字节数 
\end{DoxyReturn}
\hypertarget{a00091_a92305d9585adf8fe35c059b04f635d30_a92305d9585adf8fe35c059b04f635d30}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+write\+\_\+commit@{ringbuffer\+\_\+write\+\_\+commit}}
\index{ringbuffer\+\_\+write\+\_\+commit@{ringbuffer\+\_\+write\+\_\+commit}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+write\+\_\+commit}]{\setlength{\rightskip}{0pt plus 5cm}void ringbuffer\+\_\+write\+\_\+commit (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb, }
\item[{uint32\+\_\+t}]{size}
\end{DoxyParamCaption}
)}\label{a00091_a92305d9585adf8fe35c059b04f635d30_a92305d9585adf8fe35c059b04f635d30}


提交成功写入的字节数 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
{\em size} & 成功写入的字节数 \\
\hline
\end{DoxyParams}
\hypertarget{a00091_af34961f27369651af41a96f736a813af_af34961f27369651af41a96f736a813af}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+write\+\_\+lock\+\_\+ptr@{ringbuffer\+\_\+write\+\_\+lock\+\_\+ptr}}
\index{ringbuffer\+\_\+write\+\_\+lock\+\_\+ptr@{ringbuffer\+\_\+write\+\_\+lock\+\_\+ptr}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+write\+\_\+lock\+\_\+ptr}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ ringbuffer\+\_\+write\+\_\+lock\+\_\+ptr (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_af34961f27369651af41a96f736a813af_af34961f27369651af41a96f736a813af}


取得可写起始指针 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
可写起止指针 
\end{DoxyReturn}
\hypertarget{a00091_aa5b19df813e8df494a77c9a849ebffdd_aa5b19df813e8df494a77c9a849ebffdd}{}\index{ringbuffer.\+c@{ringbuffer.\+c}!ringbuffer\+\_\+write\+\_\+lock\+\_\+size@{ringbuffer\+\_\+write\+\_\+lock\+\_\+size}}
\index{ringbuffer\+\_\+write\+\_\+lock\+\_\+size@{ringbuffer\+\_\+write\+\_\+lock\+\_\+size}!ringbuffer.\+c@{ringbuffer.\+c}}
\subsubsection[{ringbuffer\+\_\+write\+\_\+lock\+\_\+size}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t ringbuffer\+\_\+write\+\_\+lock\+\_\+size (
\begin{DoxyParamCaption}
\item[{{\bf kringbuffer\+\_\+t} $\ast$}]{rb}
\end{DoxyParamCaption}
)}\label{a00091_aa5b19df813e8df494a77c9a849ebffdd_aa5b19df813e8df494a77c9a849ebffdd}


取得非绕回可连续写入的最大长度 


\begin{DoxyParams}{参数}
{\em rb} & kringbuffer\+\_\+t实例 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
非绕回可连续写入的最大长度 
\end{DoxyReturn}
